package com.crl.ui.controls.events{
	
	import com.crl.ui.controls.listClass.IListItemRenderer;
	
	import flash.events.Event;
	import flash.events.MouseEvent;

	public class ListItemEvent extends MouseEvent{

		public static const ITEM_CLICK:String = "itemClick";
	
		public static const ITEM_DOUBLE_CLICK:String = "itemDoubleClick";
	
		public static const ITEM_MOUSE_DOWN:String = "itemMouseDown";
	
		public static const ITEM_ROLL_OVER:String = "itemRollOver";
	
		public static const ITEM_ROLL_OUT:String = "itemRollOut";
	
		public static const ITEM_RELEASE_OUT_SIDE:String = "itemReleaseOutSide";	
		
		private var _data:*;
		private var _item:IListItemRenderer;
	
		public function ListItemEvent(type:String, data:*, item:IListItemRenderer, e:MouseEvent){
			this._data = data;
			this._item = item;
			if(e==null)e=new MouseEvent("undefine");
			super(type, false, false, e.localX, e.localY, e.relatedObject, e.ctrlKey, e.altKey, e.shiftKey, e.buttonDown);
		}
		
		public function get data():*{
			return _data;
		}
		
		public function get item():IListItemRenderer{
			return _item;
		}
		
		override public function clone():Event{
			return new ListItemEvent(type, _data, _item, this);
		}
	}
}